app.jsp<%@page import="com.utils.security.Base64"%>
<%@page import="org.apache.log4j.Logger"%>
<%@page import="java.io.InputStream"%>
<%@page import="java.net.URL"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%@page import="com.utils.HttpUtils"%>
<%@page import="java.io.FileInputStream"%>
<%@page import="java.io.InputStreamReader"%>
<%@page import="java.io.BufferedReader"%>
<%@page import="java.io.File"%>
<%@page import="java.io.PrintWriter"%>
<%@ page language="java" contentType="text/plain; charset=utf-8"
	pageEncoding="utf-8"%>
<%
    String content = "ok";
    String str = request.getQueryString();
    long time = System.currentTimeMillis();
    
    Logger logger = Logger.getLogger("APP");
    /*
    try {
    	Map headers = new HashMap();
    	byte[] b = HttpUtils.webGet(new URL("http://pay.adpobo.com/i/pay/order.do?" + str), headers, 30000, 30000);
    	content = new String(b);
    } catch (Exception e) {
    	System.out.println("" + e.toString());
    }
    */
    StringBuffer sb = new StringBuffer();
    try
    {
        InputStream in = request.getInputStream();
        BufferedReader br = new BufferedReader(new InputStreamReader(in));
        String s;
        while ((s = br.readLine()) != null){
            sb.append(s);
        }
        br.close();
        logger.info(new String(Base64.decode(sb.toString())));
    }
    catch (Exception e)
    {
        e.printStackTrace();
    }
    System.out.println("i/app.jsp cost:" + (System.currentTimeMillis() - time) + ";content:" + content.replace("\r","\\r").replace("\n","\\n"));
	response.reset();
	response.setContentLength(content.getBytes("utf-8").length);
	response.setContentType("text/plain;charset=utf-8");
	PrintWriter pw = response.getWriter();
	pw.write(content);
	pw.flush();
	pw.close();
	if (true)
		return;
%>
